package com.minsf.rpc.fault.tolerant;

import com.minsf.rpc.model.RpcResponse;
import com.minsf.rpc.spi.SpiLoader;

import java.util.Map;

/**
 * @Description
 * @Author minify
 * @Date 2024/4/1 20:13
 * @Project sf-rpc
 */
public class TolerantStrategyFactory {

    static {
        SpiLoader.load(TolerantStrategy.class);
    }

    /**
     * 获得实例
     * @param key
     * @return
     */
    public static TolerantStrategy getInstance(String key) {
        return SpiLoader.getInstance(TolerantStrategy.class, key);
    }

}
